package com.ztc.beans;

public class Book {
    private int id;
    private String name;
    private String author;
    private int bsum;
    private double price;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getBsum() {
        return bsum;
    }

    public void setBsum(int bsum) {
        this.bsum = bsum;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public Book(int id, String name, String author, int bsum, double price) {
        this(name, author, bsum, price);
        this.id = id;
    }

    public Book(String name, String author, int bsum, double price) {
        this.name = name;
        this.author = author;
        this.bsum = bsum;
        this.price = price;
    }

    public Book(){}

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", bsum=" + bsum +
                ", price=" + price +
                '}';
    }
}
